import {Component} from "react";
import {BrowserRouter,Switch,Route,Redirect} from "react-router-dom";
import AnnouncementList from "@/pages/AnnouncementList/AnnouncementList";
import DeclarationHall from "@/pages/DeclarationHall/DeclarationHall";
import Index from "@/pages/Index/Index";
import Login from "@/pages/Login/Login";
import PolicyGuidelines from "@/pages/PolicyGuidelines/PolicyGuidelines";
import ResultAnnouncement from "@/pages/ResultAnnouncement/ResultAnnouncement";
import ApplyPolicy from "@/pages/ApplyPolicy/ApplyPolicy";
export default class Router extends Component{
    render=()=>(
        <BrowserRouter>
            <Switch>
            <Route exact path="/index" component={Index} />
            <Redirect exact from="/" to="/index" />
            <Route exact path="/declaration_hall" component={DeclarationHall} />
            <Route exact path="/announcement_list" component={AnnouncementList} />
            <Route exact path="/policy_guidelines" component={PolicyGuidelines} />
            <Route exact path="/result_announcement" component={ResultAnnouncement} />
            <Route exact path="/login" component={Login} />
            <Route exact path="/apply_policy" component={ApplyPolicy} />
            </Switch>
        </BrowserRouter>
    )
}